﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace shopNet
{
    public class Customer
    {
        public string f_name, s_name, email, country, zip, state, city, address, phone;
        public static Customer Parse(order entity) {
            return new Customer() { f_name = entity.cust_firstname, s_name = entity.cust_lastname, email = entity.cust_email,
                                    country = entity.cust_country, zip = entity.cust_zip, state = entity.cust_state,
                                    city = entity.cust_city, address = entity.cust_address, phone = entity.cust_phone};
        }
        public order Convert() {
            return new order() { cust_address = address, cust_city = city, cust_country = country, cust_email = email,
                                 cust_firstname = f_name, cust_lastname = s_name, cust_phone = phone, cust_state = state,
                                 cust_zip = zip};
        }
    }
}
